<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
    <!--&lt;!&ndash; 引入 css &ndash;&gt;
    <link href="https://unpkg.com/@wangeditor/editor@latest/dist/css/style.css" rel="stylesheet">

    &lt;!&ndash; 引入 js &ndash;&gt;
    <script src="https://unpkg.com/@wangeditor/editor@latest/dist/index.js"></script>-->
</head>
<body>
<div id="div1">
    <p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p>
</div>

</body>
<script type="text/javascript"
        src="https://cdn.jsdelivr.net/npm/wangeditor@latest/dist/wangEditor.min.js">

</script>
<script type="text/javascript">
    var E = window.wangEditor; // 全局变量
    const  editor = new E('#div1')
    //配置服务接口
     editor.config.uploadImgServer = '/upload'
    //参数名字
     editor.config.uploadFileName = 'file'
      //限制图片大小和类型
    editor.config.uploadImgMaxSize  = 2 * 1024 * 1024   //2M
    editor.config.uploadImgAccept = ['jpg','jpeg','png','gif','bmp','webp']
    editor.create()
</script>
</html>